/*
 * Node.h
 */

#ifndef NODE_H_
#define NODE_H_

#define D_BREADTH 64

enum NodeType {
	NODE,
	INDEX_NODE,
	LEAF_NODE
};

class Node {
public:
	Node(NodeType type = NODE);
	~Node();

	static int GetD();

	NodeType GetNodeType();
	int NumberOfKeys();
	void SetNumberOfKeys(int num);
	int IncrementNumberOfKeys();
	bool NeedsSplit();
	bool NeedsMerge();

	int InsertKey(int key);
	int SearchKey(int key);

public: //no accessors needed
	int _numKeys;
	int _keys[D_BREADTH+1];
};

#endif /* NODE_H_ */
